package org.lilred.nzbberry.http.cookie.policy;

import org.lilred.nzbberry.http.cookie.HttpCookie;

public interface CookiePolicy {
	public boolean shouldAccept(HttpCookie cookie);
	public static CookiePolicy ACCEPT_ALL = new CookiePolicy() {
		public boolean shouldAccept(HttpCookie cookie) {
			return true;
		}
	};
	public static CookiePolicy ACCEPT_NONE = new CookiePolicy() {
		public boolean shouldAccept(HttpCookie cookie) {
			return false;
		}
	};
	public static CookiePolicy ACCEPT_VALID = new CookiePolicy() {
		public boolean shouldAccept(HttpCookie cookie) {
			return cookie.isValid();
		}
	};
}
